﻿/*********************************************************************************
 *Author:         OnClick
 *Version:        1.0
 *UnityVersion:   2018.3.11f1
 *Date:           2019-04-15
 *Description:    IFramework
 *History:        2018.11--
*********************************************************************************/
using UnityEngine;

namespace IFramework
{
    public class ABWindowTop : IEditorGUI
    {
        private void DrawTopButton(Rect rect)
        {
            Button((bo) =>
            {
                if (bo)
                    ABWindow.IsShowCollect = bo;
            }, "Collect", Height(rect.height));
            Button((bo) =>
            {
                if (!bo) return;
                ABBuildWindow.ReFreashValue();
            }, "Build", Height(rect.height));
        }
        public override void OnGUI(Rect rect, Rect worldRect)
        {
            base.OnGUI(rect, worldRect);

            DrawArea(() => {
                DrawHorizontal(() => {
                    DrawTopButton(rect);
                });
            }, rect);
        }
    }

}
